package org.vsg.stock.core.indicator.coordinate;

class UnitDefinitionBuilderManager {
	private UnitDefinitionBuilder currentBuilder;
	private OriginalDataPoint originPoint;

	/**
	 * @param originPoint
	 */
	public void setOriginPoint(OriginalDataPoint originPoint) {
		this.originPoint = originPoint;
	}

	/**
	 * @param builder
	 */
	public void setBuilder(UnitDefinitionBuilder builder) {
		currentBuilder = builder;
	}

	/**
	 * @return 
	 */
	public UnitDefinition bind() {
		
		UnitDefinition  ud = currentBuilder.build( originPoint );
		
		return ud;
	}
}
